﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="get_new_news.aspx.cs" Inherits="SQT.tracnghiem.Ajax.ASP.News.get_new_news" %>

<%@ Import Namespace="DataAccess" %>
<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">

<body>
    <%
        int cate = int.Parse(Request.QueryString["cate"]);
        var last = new TblNewsController().FetchAll().Where(x => x.NewsCategory == cate).Last();
        if (last.NewsTop == true)
        {
    %>
    <li onclick="suabaiviet(<%=last.NewsId %>)" class="news<%=last.NewsId %> newslinks w3-row">
        <div class="w3-col l10"><%=last.NewsTitle %></div>
        <div class="w3-center w3-col l1 w3-right"><i class="fa fa-star w3-large w3-text-red"></i></div>
        <div class="w3-center w3-col l1 w3-right">
            <%if (last.NewsActive == true)
              { %><i class="fa fa-eye w3-large w3-text-orange"></i><%} %>&nbsp;
        </div>
    </li>
    <%}
        else
        { %>
    <li onclick="suabaiviet(<%=last.NewsId %>)" class="news<%=last.NewsId %> newslinks w3-row">
        <div class="w3-col l10"><%=last.NewsTitle %></div>
        <div class="w3-center w3-col l1 w3-right">&nbsp;</div>
        <div class="w3-center w3-col l1 w3-right">
            <%if (last.NewsActive == true)
              { %><i class="fa fa-eye w3-large w3-text-orange"></i><%} %>&nbsp;
        </div>
    </li>
    <%} %>
</body>
</html>
